<%@ page import="com.NewsService.NewsService" %>
<%@ page import="com.NewsServiceImpl.NewsServiceImpl" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/6
  Time: 9:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        String newsid=  request.getParameter("newsid");
        if(newsid !=null || newsid !=""){
            int newId=Integer.parseInt(newsid);
            NewsService newsService = new NewsServiceImpl();
            int count =newsService.ServiceSdeleteById(newId);
            if(count>0){
                response.sendRedirect(request.getContextPath()+"/index.jsp");
            }else {
     %>
           <div>删除失败</div>
      <%
          }
      }

    %>


</body>
</html>
